<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%membertokens}}".
 *
 * @property int $tokenId Token编号
 * @property int $memberId 用户编号
 * @property string $mobile 手机号码
 * @property string $memberKey 用户标识
 * @property string $token token
 * @property string $refreshToken 用于刷新的Token
 * @property int $ctime 创建时间
 */
class Membertokens extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%membertokens}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['memberId', 'ctime'], 'integer'],
            [['mobile'], 'string', 'max' => 64],
            [['memberKey'], 'string', 'max' => 300],
            [['token', 'refreshToken'], 'string', 'max' => 200],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'tokenId' => Yii::t('app', 'Token ID'),
            'memberId' => Yii::t('app', 'Member ID'),
            'mobile' => Yii::t('app', 'Mobile'),
            'memberKey' => Yii::t('app', 'Member Key'),
            'token' => Yii::t('app', 'Token'),
            'refreshToken' => Yii::t('app', 'Refresh Token'),
            'ctime' => Yii::t('app', 'Ctime'),
        ];
    }
}
